3b88d6
@@ -62,7 +62,6 @@
 import org.apache.hadoop.hive.common.LogUtils;
 import org.apache.hadoop.hive.common.LogUtils.LogInitializationException;
 import org.apache.hadoop.hive.common.ServerUtils;
-import org.apache.hadoop.hive.common.cli.CommonCliOptions;
 import org.apache.hadoop.hive.common.metrics.common.MetricsFactory;
 import org.apache.hadoop.hive.conf.HiveConf;
 import org.apache.hadoop.hive.conf.HiveConf.ConfVars;
@@ -1209,11 +1208,17 @@
ServerOptionsProcessorResponse parse(String[] argv) {
         for (String propKey : confProps.stringPropertyNames()) {
           // save logging message for log4j output latter after log4j initialize properly
           debugMessage.append("Setting " + propKey + "=" + confProps.getProperty(propKey) + ";\n");
-          if (propKey.equalsIgnoreCase("hive.root.logger")) {
-            CommonCliOptions.splitAndSetLogger(propKey, confProps);
-          } else {
-            System.setProperty(propKey, confProps.getProperty(propKey));
+          if ("hive.log.file".equals(propKey) ||
+              "hive.log.dir".equals(propKey) ||
+              "hive.root.logger".equals(propKey)) {
+            throw new IllegalArgumentException("Logs will be split in two "
+                + "files if the commandline argument " + propKey + " is "
+                + "used. To prevent this use to HADOOP_CLIENT_OPTS -D"
+                + propKey + "=" + confProps.getProperty(propKey)
+                + " or use the set the value in the configuration file"
+                + " (see HIVE-19886)");
           }
+          System.setProperty(propKey, confProps.getProperty(propKey));
         }
 
         // Process --help
